<template>
	<view>
		<view class="cflex-c u-p-25 cbg-zhuti">
				<view class="cflex-r u-m-b-15" style="justify-content: space-between;align-items: center;">
					<image src="../../static/my/big.png" mode=""style="width: 764rpx;height: 352rpx;position: relative;"></image>
					<view class="cflex-c" style="position: absolute;color: #FFFFFF;width: 702rpx;justify-content: center;align-items: center;">
						<view class="cflex-r">
							<text style="font-weight: bold;">当前金额 (元)</text>
							<view v-if="balance>0" style="margin-left: 30rpx; font-size: 25rpx;color: yellow;" @tap="goTiXian()">
								<text>提现</text>
								<view style="border: 1rpx solid yellow;"></view>
							</view>
						</view>
						<view style="margin: 30rpx 0; font-size: 60rpx;">
							<text>{{balance}}</text>
						</view>
						
						<view>
							<text>{{content}}</text>
						</view>
					</view>
				</view>
		</view>
		<view class="cbg-white">
			<view class="cflex-c u-p-25	">
				<view class="cflex-r u-m-b-25" style="justify-content: space-between;align-items: center;" @tap="goBankCard()">
					<view style="font-weight: bold;">
						<text>银行卡</text>
					</view>
					<view class="u-m-r-10">
						<view style="color: #AAAAAA;">
						<text v-if="!bank">添加提现银行卡</text>
						<text v-else>{{bank}}</text>
						<image style="width: 14rpx;height: 24rpx; padding-left: 20rpx;" src="../../static/qieTu/arrow-right.png"></image>
						</view>
					</view>
				</view>
				</view>
			</view>
			<view class="cbg-white">
						<view class="cflex-c u-p-25">
							<view class="cflex-r u-m-b-25" style="justify-content: space-between;align-items: center;" @tap="goZhangDan()">
								<view style="font-weight: bold;">
									<text>账号流水</text>
								</view>
								<view class="u-m-r-10">
									<view style="color: #AAAAAA;">
										<text>查看收入记录</text>
										<image style="width: 14rpx;height: 24rpx; padding-left: 20rpx;" src="../../static/qieTu/arrow-right.png"></image>
									</view>
								</view>
								</view>
						</view>
						</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				balance: 0,
				content:'',
				bank: '',
			}
		},
		onShow() {
			this.myQianBao();
		},
		onLoad() {
			
		},
		methods: {
			myQianBao(){
				this.$request("worker/tixian/getMyMoney").then(res=>{
					console.log("金额===========>",res);
					this.balance = res.data.money;
					this.content = res.data.tiXianMoney;
					this.bank = res.data.bank;
				})
			},
			goZhangDan(){
				uni.navigateTo({
					url:"./zhang_hao_liu_shui"
				})
			},
			goTiXian(){
				uni.navigateTo({
					url:"./ti_xian"
				})
			},
			goBankCard(){
				uni.navigateTo({
					url:"./bank_card"
				})
			}
		}
	}
</script>

<style>

</style>
